﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using StockShark.Models;

namespace StockShark.ViewModels
{
    public class ChartData
    {
        public DateTime StartDate { get; set; }

        public string GetFlotTicks()
        {
            int c = 0;
            string ticks = "[";
            for (DateTime date = StartDate; date <= DateTime.Today; date = date.AddDays(1))
            {
                ticks += "[" + c + ", '" + date.ToShortDateString() + "'], ";
                c++;
            }
            ticks += "]";
            return ticks;
        }
    }
}